package plus.easydo.xxl.job.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author yuzhanfeng
 * @Date 2023/2/17 16:14
 * @Description 配置文件对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ConfigurationProperties(prefix = "xxl.job")
public class XxlJobPlusProperties {

    private Admin admin;

    private Executor executor;

    private Plus plus;

    private String accessToken;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Admin{

        private String addresses;

        private String username;

        private String password;

    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Executor{

        private String appname;

        private String title;

        private String address;

        private String ip;

        private int port;

        private String logPath;

        private int logRetentionDays;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Plus {

        private String requestType;
    }
}
